//这个文件用于表示路由和处理函数一种映射关系
const express = require('express');
//创建路由对象 用来注册路由
const router = express.Router();
//导入路由处理函数模块
const user_handler = require('../router_handler/user')
//导入实现规则的中间件
const expressJoi = require('@escook/express-joi');
//通过解构将规则提取出来
const  { reg_login_schema } = require('../schema/user')
//导入路由处理函数模块

router.post('/reguser',expressJoi(reg_login_schema),user_handler.regUser)
router.post('/login',expressJoi(reg_login_schema),user_handler.login)
//将路由暴露出去
module.exports = router